//
//  ZDFileLogger.m
//  TestLogDemoOriginal
//
//  Created by JXH on 2020/12/24.
//

#import "ZDFileLogger.h"

@implementation ZDFileLogger

- (instancetype)init {
    if (self = [super init]) {
        [self initial];
    }
    return self;
}

- (void)initial {
    //最大的日志文件数量
    self.logFileManager.maximumNumberOfLogFiles = 2;
#ifdef DEBUG
    //文件大小
    self.maximumFileSize = 1024*20;// 20k
    //保存周期
    self.rollingFrequency = 60;//60s
#else
    //文件大小
    self.maximumFileSize = 1024*1024*10;// 10M
    //保存周期
    self.rollingFrequency = 60*60*24;//1天
#endif
}

- (instancetype)initWithLogFileManager:(id<DDLogFileManager>)logFileManager {
    ZDFileLogger *manageer = [super initWithLogFileManager:logFileManager];
    [manageer initial];
    return manageer;
}


@end
